package com.tuanzi.loan.business.repository.system;

import java.util.List;

import com.tuanzi.loan.business.entity.system.DataPermissionRelation;
import com.tuanzi.loan.business.entity.system.RelationType;
import com.tuanzi.loan.core.repository.JPAAuditRepository;

/**
 * @author Ray 2017/09/21
 */
public interface DataPermissionRelationRepository extends JPAAuditRepository<DataPermissionRelation, String> {

	DataPermissionRelation findByPermissionIdAndRelationTypeAndRelationId(String permissionId, RelationType relationType, String relationId);

	List<DataPermissionRelation> findAllByRelationId(String relationId);

	List<DataPermissionRelation> findAllByPermissionId(String permissionId);
}
